#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#include "common.h"

void debug (const char* format, ...) 
{
#ifdef DEBUG    
    va_list args;
//     fprintf (stdout, "DEBUG: ");
    va_start (args, format);
    vfprintf (stdout, format, args);
    va_end (args);
//     fprintf (stdout, "");
#endif
}

void reportError (const char* format, ...) 
{
    va_list args;
    fprintf (stderr, "ERROR: ");
    va_start (args, format);
    vfprintf (stderr, format, args);
    va_end (args);
    fprintf (stderr, "\n");
    exit (-1);
}
